<div class="content">
    <div class="tl-img"><a class="<?php echo $this->controller; ?>"></a></div>
    <h1><?php echo $this->result->PAG_TITULO; ?></h1>
    <div class="texto">
        <?php echo $this->result->PAG_TEXTO; ?>
        
        <table class="calendario">
            <thead>
            <th>Universidade ou faculdade</th>
            <th>Período de inscrições</th>
            <th>Data(s) de prova(s)</th>
            <th>Inscrição</th>
            </thead>
            <tbody>
        <?php
        foreach ($this->cal as $c){
        ?>
            <tr>
                <td align="center"><?
                    $img = 'public/upload/calendario/'.$c->CAL_ID.'.*';
                    foreach (glob($img) as $src) {
                      $img = $src;
                    } 
                    ?>
                    <img src="<?php echo $this->urlbase.'/'.$img;?>"  height="100px" /></td>
                <td><?php echo str_replace('|', '<br>', $c->CAL_PRD); ?></td>
                <td><?php echo str_replace('|', '<br>', $c->CAL_DAT); ?></td>
                <td><?php if(strlen($c->CAL_LNK) > 0) { ?> <a href="http://<?php echo $c->CAL_LNK; ?>" target="_blank">Link de Acesso</a><?php } ?></td>
            </tr>
        <?php } ?>
            </tbody>
        </table>
    </div>    
</div>